import { type RouteRecordRaw } from 'vue-router'
import Layout from '../layout/index.vue'
const stuteRoutes: Array<RouteRecordRaw> = [
    {
        path: '/',
        component: Layout,
        redirect: 'home',
        children: [
            {
                path: 'home',
                component: () => import('@/views/Home/index.vue'),
                name: 'Home',
                meta: {
                    title: '首页',
                    icon: 'HomeFilled',
                    auth: false
                }
            }
        ]
    },
    {
        path: '/tools',
        component: Layout,
        name: 'Tools',
        meta: {
            title: '工具组件',
            icon: 'Box'
        },
        children: [
            {
                path: 'Calendar',
                component: () => import('../views/Tools/CalendarPage/index.vue'),
                name: 'CalendarPage',
                meta: {
                    title: '日历',
                    icon: 'Calendar',
                    auth: false
                }
            },
            {
                path: 'myinfo',
                component: () => import('../views/MyInfo/index.vue'),
                name: 'Menu2MyInfo',
                meta: {
                    title: '我的主页',
                    icon: 'User',
                    auth: true
                }
            }
        ]
    },
    {
        path: '',
        component: Layout,
        redirect: 'myinfo',
        children: [
            {
                path: 'myinfo',
                component: () => import('../views/MyInfo/index.vue'),
                name: 'MyInfo',
                meta: {
                    title: '我的主页',
                    icon: 'User',
                    auth: true
                }
            }
        ]
    },

]

export default stuteRoutes